]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellWindowTracker: Follow transients for focus app
authorColin Walters <walters@verbum.org>
Tue, 12 Apr 2011 21:29:05 +0000 (17:29 -0400)
committerColin Walters <walters@verbum.org>
Tue, 12 Apr 2011 21:57:20 +0000 (17:57 -0400)
As a side effect of (see bug 642221), we no longer put docks or
transient windows into the hash table mapping windows to apps.  The
"focused application" code relied on at least transients being in
there.

Fix this by calling the public API to map a window to an app, which
will at least follow transients.  Whether we also want further
matching here (e.g. with window grouping) is another issue, but that
can happen as a different bug.

https://bugzilla.gnome.org/show_bug.cgi?id=647082

src/shell-window-tracker.c

index 44a4a48e375c88d83ed84dec40300ab76a9ecad2..9b24cdc0a3b6b7f53e9e5fac1d1bcd5777069f93 100644 (file)
@@ -886,7 +886,7 @@ on_focus_window_changed (MetaDisplay        *display,
   ShellApp *new_focus_app;
 
   new_focus_win = meta_display_get_focus_window (display);
-  new_focus_app = new_focus_win ? g_hash_table_lookup (tracker->window_to_app, new_focus_win) : NULL;
+  new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (tracker, new_focus_win) : NULL;
 
   set_focus_app (tracker, new_focus_app);
 }